<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::get('/index','IndexController@index');
Route::get('/login','LoginController@login')->name('login');
Route::post('/login','LoginController@loginer')->name('loginer');
Route::get('/register','RegisterController@register')->name('register');
Route::post('/register','RegisterController@store')->name('register');
Route::get('/loginOut','LoginController@loginOut')->name('loginOut');
Route::get('/password','PasswordController@changePassword')->name('password');
Route::post('/password','PasswordController@password')->name('password');
Route::resource('/user','UserController');
Route::get('/jihuo{token}','RegisterController@jihuo')->name('jihuo');
Route::get('/forget','ForgetPassword@forget')->name('forget');
Route::post('/sendEmail','ForgetPassword@sendEmail')->name('sendEmail');
Route::get('/changePass/{email}','ForgetPassword@changePass')->name('changePass');
Route::post('/changePass','ForgetPassword@change')->name('change');
//文章路由
Route::resource('/blog','BlogController');